
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>支付宝手机网站支付接口</title>
</head>
<body>
<div style="width:200px;height:200px;background:red;" onclick="to()">支付宝手机网站支付</div>

</body>

<!--<script src="../js/jquery-1.12.1.js"></script>-->
<script src="/static/layuimini/lib/jquery-3.4.1/jquery-3.4.1.min.js" charset="utf-8"></script>

<script>
    var prodConfig = {
        "body": "云盟商桥-购买商品",
        "subject": "da云盟商桥-购买商品",
        "out_trade_no": "0806515157980353",
        "timeout_express": "60m",
        "total_amount": 0.01,
        "product_code": "QUICK_WAP_WAY"
        // "product_code": "FAST_INSTANT_TRADE_PAY"
    }
    var alipayConfig = {
        biz_content: JSON.stringify(prodConfig),
        app_id: '2021001187619640',
        version: '1.0',
        format: 'json',
        sign_type: 'RSA2',
        method: 'alipay.trade.wap.pay',
        notify_url: 'http://124.70.177.101:6001/api/AlipayService/AlipayCallback',
        // return_url: 'http://***/alipy/return_url.php',
        charset: 'UTF-8',
        sign: 'McKhqISunHqkYBtLOr4EoaDCXcKQFFeoCPYYipRXGd0EAmCp+pkUiwGF9lY+Dm/meuEk1IjSFS8jGZNPBv+Ydbm9h6QOrnu8GrTy9m6bs7vwNV6jIskj0dWMcSRth2n3C2++qKjxxYkonY+6qg61se4XBFRXBUfiW4ZUdU1/mrNESpI+ugivMGWQaFgKLt0QnAmbIvxipzpRiGo2rPerqupAGUVQRUuGhpdtOmQtN0Y4V9cND1xJcdbJZZSu8HY56Ois5zL0XqVv01ZsQ7npgHKtlmh8YTZnblrV33vnmwIinN0hXmIQ0Py0kDX718IIULte8+9A4AvnN/62uAvJiQ',
        timestamp: '2020-08-14 11:03:03'
    }
    function to() {
        httpPost('https://openapi.alipay.com/gateway.do', alipayConfig)
    }
    function httpPost(URL, PARAMS) {
        var temp = document.createElement("form");
        temp.action = URL;
        temp.method = "post";
        temp.style.display = "none";

        for (var x in PARAMS) {
            var opt = document.createElement("textarea");
            opt.name = x;
            opt.value = PARAMS[x];
            temp.appendChild(opt);
        }

        document.body.appendChild(temp);
        temp.submit();

        return temp;
    }
</script>
</html>
